<?php

/* @var $factory \Illuminate\Database\Eloquent\Factory */

use App\Model;
use App\Models\Asset;
use App\Models\AssetStock;
use App\Models\Fee\FeeFormula;
use Faker\Generator as Faker;

$factory->define(FeeFormula::class, function (Faker $faker) {
    $num1 = $faker->numberBetween(10, 1000);
    $num2 = $faker->numberBetween(10, 1000);
    $begin = min($num1, $num2);
    $end = max($num1, $num2);
    $seed = round($begin/$end, 2);
    $condition = "name = 'axy' and xyz = 'zbc'";
    return [
        "name" => $faker->name,
        "description" => $faker->text,
        "criteria" => $condition,
        "formula" => "{price} * " . $seed
    ];
});
